package com.xushimu.dao;

import com.xushimu.domain.Product;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface ProductDao {
    @Select("select * from product")
    List<Product> findAll() throws Exception;

    @Insert("INSERT INTO PRODUCT (id, productnum, productname, cityname, departuretime, productprice,productdesc, productstatus)VALUES (#{id},#{productnum}, #{productname}, #{cityname}, #{departuretime }, #{productprice}, #{productdesc}, #{productstatus})")
    void save(Product product);
}
